package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {
    //定义调用方法的（完全）路径
    //远程删除视频
    @DeleteMapping(value = "/eduvod/video/removeAlyVideo/{vId}")
    public R removeAlyVideo(@PathVariable("vId") String vId);  //注意一定要在PathVariable("vId")中写入vId

    //远程删除多个视频
    @DeleteMapping(value = "/eduvod/video/removeBatch")
    public R deleteBatch(@RequestParam("vIdList") List<String> vIdList);


}
